package cn.tedu.egweibo1.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserRegDTO {
    @ApiModelProperty(value="用户名",required = true,example = "张三")
    @NotBlank(message = "用户名不能为null")//空串和空格
    private String username;
    @ApiModelProperty(value="密码",required = true,example = "123456abc")
    @NotBlank(message = "密码不能为null")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{3,15}$",message = "密码只能是中文，字母，数字，下划线，长度在3-15位之间")
    private String password;
    @ApiModelProperty(value="昵称",required = true,example = "阿三哥")
    @NotBlank(message = "昵称不能为null")
    private String nickname;
}
